<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: id
  Date: 2020/12/29
  Time: 18:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page  isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Center</title>
    <script type="text/javascript" src="../../../static/jquery-3.4.1.js"></script>
    <link rel="stylesheet" href="../../../static/center.css">
    <script type="text/javascript">
        $(function () {

            $("#di1").hover(function () {
                    $("#xs").show()
                    $("#d2").hide()
                    $("#d3").hide()
                    $("#d4").hide()
                }
            )

            $("#di2").hover(function () {
                    $("#d2").show()
                    $("#xs").hide()
                    $("#d3").hide()
                    $("#d4").hide()
                }
            )

            $("#di3").hover(function () {
                    $("#d3").show()
                    $("#xs").hide()
                    $("#d2").hide()
                    $("#d4").hide()
                }
            )

            $("#di4").hover(function () {
                    $("#d4").show()
                    $("#xs").hide()
                    $("#d3").hide()
                }
            )

            $("#center").hover(function () {
                    $("#d4").hide()
                    $("#xs").hide()
                    $("#d3").hide()
                }
            )

            $("#i1").hover(function () {
                $("#xs").hide()
            })

            $("#i2").hover(function () {
                $("#d4").hide()
            })

            $("#aa").click(function () {
                    $("#zuo").fadeToggle("slow")
                }
            )

            $("#aaa").click(function () {
                    $("#you").fadeToggle("slow")
                }
            )


            $("body").mouseover(function () {

            })



        })

        var t = null;
        t = setTimeout(time,100);//開始运行
        function time()
        {
            clearTimeout(t);//清除定时器
            dt = new Date();
            //获取当前年
            var year=dt.getFullYear();
            //获取当前月
            var month=dt.getMonth()+1;
            //获取当前日
            var date=dt.getDate();
            var h=dt.getHours();//获取时
            var m=dt.getMinutes();//获取分
            var s=dt.getSeconds();//获取秒
            document.getElementById("showTime").innerHTML =  year+"年"+month+"月"+date+"日"+h+"时"+m+"分"+s+"秒";
            t = setTimeout(time,1000); //设定定时器，循环运行
        }

        /*退出*/
        function exit() {
            var url="${pageContext.request.contextPath}/exit";
            if(confirm("您确认退出吗?")){
                location.href=url;
                return true;
            }else {
                return  false;
            }
        }

        function nopower() {
           alert("您没有权限访问!")
        }


    </script>
</head>
<body>

<div id="left">
    <div class="top">
        <span>博宏</span>
    </div>

    <div id="i1"></div>
    <!--销售-->
    <div class="div1" id="di1">
        <img src="../../../static/img/01.png" alt=""><span>销售</span>
    </div>

    <!--库存-->
    <div class="div1" id="di2">
        <img src="../../../static/img/02.png" alt=""><span>库存</span>
    </div>

    <!--财务-->
    <div class="div1" id="di3">
        <img src="../../../static/img/03.png" alt=""><span>财务</span>
    </div>

    <!--信息-->
    <div class="div1" id="di4">
        <img src="../../../static/img/05.png" alt=""><span>资料</span>
    </div>
    <!--隐藏的小手-->
    <div id="i2"></div>
</div>

<div id="top">
    <div id="rig">
        <a href="#" id="aa"><img src="../../../static/img/铃铛.png" alt="" class="img1"></a>&nbsp;
        <a href="#" id="aaa"> <img src="../../../static/img/人.png" alt="" class="img1"></a>
        <c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
        &nbsp;&nbsp;<a href="${pageContext.request.contextPath}/Log" style="color: blueviolet">go sign in</a>
        </c:if>
        <a href="#">${sessionScope.boosUser} ${sessionScope.resUser} ${sessionScope.makerAndINOOTUser}</a>
        <c:if test="${sessionScope.boosUser!=null || sessionScope.resUser!=null || sessionScope.makerAndINOOTUser!=null}">
            &nbsp;<a href="javascript:exit()">exit</a>
        </c:if>
    </div>
</div>

<div id="zuo">
    <div>
        <span>预警报告</span>
    </div><br>
    <div>
        <span>低库存</span>
        <span>有0个商品低于库存预警线</span>
    </div><br>
    <div>
        <span>高库存</span>
        <span>有0个商品高于库存预警线</span>
    </div>
</div>
<div id="you">
    <div>
        <span>博宏</span>
    </div><br>
    <div>
        <span>低库存</span>
        <span>有0个商品低于库存预警线</span>
    </div><br>
    <div>
        <span>高库存</span>
        <span>有0个商品高于库存预警线</span>
    </div>
</div>


<div id="center">
    <div id="user">
        <h3 style="color: lightpink">
            欢迎: ${sessionScope.boosUser} ${sessionScope.resUser} ${sessionScope.makerAndINOOTUser}
            <c:if test="${sessionScope.resUser!=null}">
                    <span style="font-size: 1em">你有${sum}条未查看的消息</span>
                &nbsp;&nbsp;&nbsp; <a href="${pageContext.request.contextPath}/findLackList">view</a>
            </c:if>

            <c:if test="${sessionScope.boosUser!=null}">
                <span style="font-size: 1em">你有${sum2}条已被查看</span>
                &nbsp;&nbsp;&nbsp; <a href="${pageContext.request.contextPath}/findLackList">view</a>
            </c:if>

        </h3>

    </div>



    <div id="lf">
        <div class="time">
            <h2 style="color: lightpink;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前时间</h2><br>
            <h2 id="showTime" style="color: lightpink;"></h2>
        </div>
    </div>

    <div id="rg">


        <c:if test="${sessionScope.boosUser!=null || sessionScope.makerAndINOOTUser!=null}">
        <a href="${pageContext.request.contextPath}/Maker1/findAllByPage">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/xs.png" alt=""><br>
                    <span>销售</span>
                </div>
            </div>
        </a>
        </c:if>

        <c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
            <a href="javascript:nopower()">
                <div class="rg1">
                    <div class="r2">
                        <img src="../static/img/xs.png" alt=""><br>
                        <span>销售</span>
                    </div>
                </div>
            </a>
        </c:if>



<c:if test="${sessionScope.boosUser!=null || sessionScope.resUser!=null || sessionScope.makerAndINOOTUser!=null}">
        <a href="${pageContext.request.contextPath}/EnterGood/login">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/jh.png" alt=""><br>
                    <span>进货</span>
                </div>
            </div>
        </a>
</c:if>

<c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
    <a href="javascript:nopower()">
        <div class="rg1">
            <div class="r2">
                <img src="../static/img/jh.png" alt=""><br>
                <span>进货</span>
            </div>
        </div>
    </a>
</c:if>

<c:if test="${sessionScope.boosUser!=null || sessionScope.resUser!=null || sessionScope.makerAndINOOTUser!=null}">
<a href="${pageContext.request.contextPath}/IntoAndOut/login">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/jin.png" alt=""><br>
                    <span>出库</span>
                </div>
            </div>
        </a>
</c:if>

<c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
    <a href="javascript:nopower()">
        <div class="rg1">
            <div class="r2">
                <img src="../static/img/jin.png" alt=""><br>
                <span>出库</span>
            </div>
        </div>
    </a>
</c:if>



<c:if test="${sessionScope.boosUser!=null || sessionScope.resUser!=null || sessionScope.makerAndINOOTUser!=null}">
<a href="${pageContext.request.contextPath}/IntoAndOut/OutFindAll">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/chu.png" alt=""><br>
                    <span>入库</span>
                </div>
            </div>
        </a>
</c:if>

<c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
    <a href="javascript:nopower()">
        <div class="rg1">
            <div class="r2">
                <img src="../static/img/chu.png" alt=""><br>
                <span>入库</span>
            </div>
        </div>
    </a>
</c:if>



<c:if test="${sessionScope.boosUser!=null}">
<a href="${pageContext.request.contextPath}/bank/loginBank">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/cw.png" alt=""><br>
                    <span>财务</span>
                </div>
            </div>
        </a>
</c:if>

<c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
    <a href="javascript:nopower()">
        <div class="rg1">
            <div class="r2">
                <img src="../static/img/cw.png" alt=""><br>
                <span>财务</span>
            </div>
        </div>
    </a>

</c:if>


<c:if test="${sessionScope.boosUser!=null}">
<a href="${pageContext.request.contextPath}/user/findAllUser">
            <div class="rg1">
                <div class="r2">
                    <img src="../static/img/人.png" alt=""><br>
                    <span>资料</span>
                </div>
            </div>
        </a>
</c:if>
<c:if test="${sessionScope.boosUser==null && sessionScope.resUser==null && sessionScope.makerAndINOOTUser==null}">
    <a href="javascript:nopower()">
        <div class="rg1">
            <div class="r2">
                <img src="../static/img/人.png" alt=""><br>
                <span>资料</span>
            </div>
        </div>
    </a>
</c:if>


</div>
</div>




</body>
</html>
